Skip to content

fix: report /mtworld and /mtcity create only after the database save finishes - #129

Merged
duranaaron merged 1 commit into
masterfrom
fix/place-create-after-save
Oct 10, 2026
Merged

duranaaron merged 1 commit into
masterfrom
fix/place-create-after-save

Conversation

@duranaaron

Copy link
Copy Markdown
Member

Summary

/mtworld create and /mtcity create told the player the place was created before the database save had finished. If the save failed, or the server stopped in between, the player was told it worked while nothing was stored.

  • PlacesModule.createWorld/createCity now return the save future (saveStormModel(...).thenApply(...)).
  • The commands reply on the main thread once that future completes, and report an error when the save fails.

Testing

  • ./gradlew compileJava test passes.
  • The same change runs in the Craftville fork (OpenMinetopia-CV). There, two in-game end-to-end tests check it on a real Paper server:
    • The success message only arrives after the place is stored.
    • A failed save, forced by holding an exclusive lock on the SQLite database, is reported as an error.
  • Both tests fail on the old code.

@duranaaron
duranaaron merged commit 5afd8d5 into master Oct 10, 2026
2 checks passed
@duranaaron
duranaaron deleted the fix/place-create-after-save branch October 10, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant